# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-basictracer
pkgver=3.2.0
pkgrel=3
pkgdesc='The Python implementation of the "BasicTracer" reference implementation'
url="https://github.com/opentracing/basictracer"
license=('MIT')
arch=('any')
depends=('python-opentracing' 'python-protobuf' 'python-six')
makedepends=('python-setuptools')
checkdepends=('python-mock' 'python-pytest')
source=("https://github.com/opentracing/basictracer-python/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('48923ca75b459401ab604174a62c611ea44c5904709260d0635dc0436f5c0d88b7564d2fcf68a3fd18f3825ba615347bed7e79a41f303745ca7de282bbd4c61c')

build() {
  cd basictracer-python-$pkgver
  python setup.py build
}

check() {
  cd basictracer-python-$pkgver
  pytest
}

package() {
  cd basictracer-python-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
